//
//  LWPhotoCollectionViewCell.m
//  1.28  weibo
//
//  Created by mac on 15/2/18.
//  Copyright (c) 2015年 mac. All rights reserved.
//
#import "LWPhotoCollectionViewCell.h"
#import "LWPhotos.h"
#import "UIImageView+WebCache.h"
@interface LWPhotoCollectionViewCell ()

@property (weak, nonatomic) IBOutlet UIImageView *gif;
@end
@implementation LWPhotoCollectionViewCell

- (void)awakeFromNib{

    
}

- (void)setPhotos:(LWPhotos *)photos{

    _photos = photos;
    NSURL *url = [NSURL URLWithString:_photos.thumbnail_pic];
    [self.photo sd_setImageWithURL:url placeholderImage:[UIImage imageNamed:@"avatar_default_big"]];
    
    //if ([url.absoluteString.lowercaseString hasSuffix:@".gif"]) {
    if ([[url.absoluteString.lowercaseString pathExtension] isEqualToString:@"gif"]) {
        self.gif.hidden = NO;
    }else{
        self.gif.hidden = YES;
    }
}

@end
